#extension :task_notification => :none do
#  task :notify_task_success do
#  end
#  
#  task :notify_task_failure do
#  end
#  
#  task :notify_task_success_summary do
#  end
#  
#  task :notify_task_failure_summary do
#  end  
#end
#
#extension :deployment_notification => :none do
#  task :notify_deployment_success do
#  end
#  
#  task :notify_deployment_failure do
#  end
#  
#  task :notify_deployment_success_summary do
#  end
#  
#  task :notify_deployment_failure_summary do
#  end
#end
#
#configuration :base do
#  use :task_notification => :none
#  use :deployment_notification => :none
#end
#
#set :summary_notifications, mc.get_configuration(:summary_notifications)
#
## doing this after process_multi_configuration_files so that user can
## control notifications in on-triggers using "should_notify" variable
#after "wondercap:process_multi_configuration_files" do
#  mc.each do |name,conf|
#    conf.instance_eval do
#      on :deployment_succeeded do
#        notify_deployment_success if fetch(:should_notify, false)
#      end
#
#      on :deployment_failed do
#        set :error, $!
#        notify_deployment_failure if fetch(:should_notify, false)
#      end
#
#      on :task_succeeded do
#        set :task_name, outer_configuration.fetch(:task)
#        notify_task_success if fetch(:should_notify, false)
#      end
#
#      on :task_failed do
#        set :task_name, outer_configuration.fetch(:task)
#        set :error, $!
#        notify_task_failure if fetch(:should_notify, false)
#      end
#    end
#  end
#  
#  on :deployment_succeeded do
#    summary_notifications.notify_deployment_success_summary if fetch(:should_notify, false)
#  end
#
#  on :deployment_failed do
#    summary_notifications.set :error, $!
#    summary_notifications.notify_deployment_failure_summary if fetch(:should_notify, false)
#  end
#
#  on :task_succeeded do
#    summary_notifications.set :task_name, fetch(:task)
#    summary_notifications.notify_task_success_summary if fetch(:should_notify, false)
#  end
#
#  on :task_failed do
#    summary_notifications.set :task_name, fetch(:task)
#    summary_notifications.set :error, $!
#    summary_notifications.notify_task_failure_summary if fetch(:should_notify, false)
#  end
#end